package jmine.tec.persist.schema.tableperclass.list;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.Table;

import jmine.tec.persist.annotation.Alias;
import jmine.tec.persist.annotation.Comment;
import jmine.tec.persist.annotation.Comments;
import jmine.tec.persist.annotation.Index;

import org.hibernate.annotations.CollectionOfElements;
import org.hibernate.annotations.IndexColumn;

import bancosys.tec.component.Documentation;

@Entity
@Alias("PRCLS1")
@Table(name = "PER_CLASS_1")
@Documentation("PER CLASS 1")
public class TablePerClassChild1ListEntity extends AbstractTablePerClassListEntity {

    private String campoProprio;

    private List<String> childStrings;

    /**
     * @return the campoProprio
     */
    @Column(name = "CAMPO_PROPRIO", length = 42, nullable = false)
    @Documentation("CAMPO PROPRIO PER CLASS 1")
    public String getCampoProprio() {
        return this.campoProprio;
    }

    /**
     * @param campoProprio the campoProprio to set
     */
    public void setCampoProprio(String campoProprio) {
        this.campoProprio = campoProprio;
    }

    /**
     * @return the childStrings
     */
    @Index(suffix = "JT_0", columns = "COD_PER_CLASS")
    @Alias("PCCSTL")
    @CollectionOfElements
    @JoinTable(name = "PER_CLASS_1_STRINGS", joinColumns = @JoinColumn(name = "COD_PER_CLASS", nullable = false))
    @IndexColumn(name = "IDX")
    @Column(name = "PER_CLASS_1_STRING", length = 15, nullable = true)
    @Comments({ @Comment(table = "PER_CLASS_1_STRINGS", value = "TABELA LISTA STRINGS"),
            @Comment(table = "PER_CLASS_1_STRINGS", column = "COD_PER_CLASS", value = "CODIGO DO PER CLASS OWNER"),
            @Comment(table = "PER_CLASS_1_STRINGS", column = "IDX", value = "INDICE NA LISTA"),
            @Comment(table = "PER_CLASS_1_STRINGS", column = "PER_CLASS_1_STRING", value = "CONTEUDO DA LISTA") })
    public List<String> getChildStrings() {
        return this.childStrings;
    }

    /**
     * @param childStrings the childStrings to set
     */
    public void setChildStrings(List<String> childStrings) {
        this.childStrings = childStrings;
    }
}
